//bange_simplestring.hpp
//Copyright (C) 2010-2011 Oscar (.teri) Triano

//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.

//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.

//You should have received a copy of the GNU General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef _bange_simplestring_
#define _bange_simplestring_

#include <lua5.1/lua.hpp>
#include <SFML/Graphics.hpp>
#include <bange_behavior.hpp>
#include <bange_object.hpp>

namespace bange{
	class simplestring: public bange::object, public sf::String{
		protected:
			int reffont;
			std::size_t cursor;
		public:		
			simplestring(const char *, lua_State *);
			simplestring(lua_State *);
			bool NewIndex(lua_State *);
			bool Index(lua_State *);
			bool MoveCursor(std::size_t);
			void AddChar(sf::Uint32);
			void QuitChar(std::size_t);
			sf::Uint32 GetUnicodeChar(std::size_t);
			void CleanVM(lua_State *);
			~simplestring();
			
			static void RegisterVM(lua_State *);
			
	};
}

//These methods aren't implemented yet
static int bangesimplestring_MoveCursor(lua_State *);
static int bangesimplestring_AddChar(lua_State *);
static int bangesimplestring_QuitChar(lua_State *);
static int bangesimplestring_GetChar(lua_State *);
static int bangesimplestring_GetCharacterPos(lua_State *);
static int bangesimplestring_GetUnicodeChar(lua_State *);
static int bangesimplestring_LoadFromFile(lua_State *);

#endif
